<!DOCTYPE html>
<html lang="en">
	<head>
		<meta charset="UTF-8">
		<meta http-equiv="X-UA-Compatible" content="IE=edge">
		<meta name="format-detection" content="telephone=no" />
		<meta name="viewport" content="width=device-width,initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no"/>
		<script src="../../script/mui.min.js"></script>
		<link rel="stylesheet" href="../../css/mui.min.css" />
		<link rel="stylesheet" href="../../css/swiper-3.4.2.min.css">
		<link rel="stylesheet" type="text/css" href="../../css/weui.min.css">
		<link rel="stylesheet" href="../../css/base.css"/>
		<link rel="stylesheet" href="../../css/personal.css">
		<link rel="stylesheet" href="../../css/exam.css">
		<title>实习考核页</title>
		<script type="text/javascript" charset="utf-8">
			mui.init();
		</script>
		<style>
			.weui_mask {
				position: fixed;
				z-index: 998;
				top: 0;
				right: 0;
				bottom: 0;
				left: 0;
			}
			.weui_dialog {
				z-index: 999;
			}
			.swiper-wrapper {
				min-height: 400px
			}
		.stu-test .mui-btn-primary {
				color: #fff;
				background-color: #FF9900;
				border: 1px solid #FF9900;
				padding-left: 2em;
				padding-right: 2em;
			}
			.questionItemImgDiv {
				height: 60%;
				width: 80%;
				max-height: 200px;
				max-width: 95%;
				margin-left: 13px;
			}
			.xuanzeImgDiv {
				width: 100%;
				height: 4rem
			}
			.tiankong {
				font-family: inherit;
				border-bottom: 1px solid #000;
				margin: 0 8px;
				text-align: center;
				width: auto;
				/*word-break:break-all*/
			}
			.question_video_div {
				padding: 10px 10px;
				padding-left: 20px;
			}
			.question_video_div	video {
				width: 100%;
				height: 13em;
				background-color: black;
			}
			.question_video_div	img {
				width: 100%;
				height: 10em;
				background-color: black;
			}
			.option_video_div {
				padding: 10px 10px;
				padding-left: 55px;
			}
			.option_video_div	img {
				width: 100%;
				height: 8em;
				background-color: black;
			}
			.option_video_div	video {
				width: 100%;
				height: 12em;
			}
		</style>
	</head>
	<body >
		<div class="stu-test" id="scroll">
			<div class="base_style_color base_title_Immerse" id='BarAppearance' ></div>
			<div class="base_navigation_bar base_style_color base_navigation_item_bar base_title_position" >
				<a class="base_left_item" href="#" onclick="backClick()"> <img class="base_back_icon" src="../../image/icon_jiantou.png" alt=""> </a>
				<span id="title">考核</span>
				<a class="base_right_item nav-item" id="wancheng"> </a>
			</div>
			<div class="space10 " style="margin-top: 64px"></div>
			<div class="k-con-border qusetion-type " >
				<div class="k-con-part" style="position: static">
					<p class="k-text-center k-c323 k-f12">
						<span class="test-score-detail "> 试卷分数：<span class="k-cred" id="score"></span>分 </span>
						<span class="test-score-detail"> 通过分数：<span class="k-cred" id="passscore"></span>分 </span>
						<span class="test-score-detail"> 考试时间：<span class="k-cred" id="kstime"></span>分 </span>
					</p>
				</div>
			</div>
			<div class="k-con test-m-bottom70 test-analysis" id="question_div">
				<div class="swiper-container">
					<div class="swiper-wrapper" ></div>
				</div>
			</div>
			<div class="k-con1 k-text-center k-fixed-bottom test-bottom1" id="sub_div">
				<div class="k-con-part1">
					<div class="remainingtime ">
						<span> 倒计时 </span>
						<span id="kaoShiTime" class="k-cred"></span>
					</div>
					<button type="button" class="mui-btn mui-btn-primary" onclick="CheckSubmit()">
						交卷
					</button>
					<div class="test_card_div">
						<a class="base_right_item "style="color: #18B4ED" href="#popover-card">答题卡 </a>
					</div>
				</div>
			</div>
			<div id="popover-card" class="mui-popover test-num-card" style=" width: 97%">
				<div class="mui-scroll-wrapper">
					<div class="mui-scroll" id="scroll-card"></div>
				</div>
			</div>
		</div>
		<div id="offlineAlert" class="weui_dialog_confirm" style="display: none;">
			<div class="weui_mask"></div>
			<div class="weui_dialog">
				<div class="weui_dialog_hd">
					<strong class="weui_dialog_title" id="checkNum"></strong>
				</div>
				<div class="weui_dialog_bd"></div>
				<div class="weui_dialog_ft">
					<a  href="#" class="weui_btn_dialog default" id="closeTest_no" style="color:#18b4ed">取消</a>
					<a  href="#" class="weui_btn_dialog primary" id="closeTest_yes" style="color:#18b4ed">确定</a>
				</div>
			</div>
		</div>
		<div class="weui_dialog_alert" id="closeAlert" style="display: none;">
			<div class="weui_mask"></div>
			<div class="weui_dialog">
				<div class="weui_dialog_hd">
					<strong class="weui_dialog_title" id="checkNum2"></strong>
				</div>
				<div class="weui_dialog_ft">
					<a  href="#" class="weui_btn_dialog primary" id="NoDatacloseTest_yes" style="color:#18b4ed">确定</a>
				</div>
			</div>
		</div>
		<div id="toastAlert" class="weui_dialog_confirm" style="display: none;">
			<div class="weui_mask"></div>
			<div class="weui_dialog">
				<div class="weui_dialog_hd">
					<strong class="weui_dialog_title" id="checkNum3"></strong>
				</div>
				<div class="weui_dialog_bd"></div>
				<div class="weui_dialog_ft">
					<a  href="#" class="weui_btn_dialog default" id="toast_no" style="color:#18b4ed">取消</a>
					<a  href="#" class="weui_btn_dialog primary" id="toast_yes" style="color:#18b4ed">确定</a>
				</div>
			</div>
		</div>
		<div class="weui_dialog_alert" id="scoreAlert" style="display: none;">
			<div class="weui_mask"></div>
			<div class="weui_dialog">
				<div class="weui_dialog_hd">
					<strong class="weui_dialog_title" id='score_title'></strong>
				</div>
				<div class="weui_dialog_bd" id="score_content"></div>
				<div class="weui_dialog_ft">
					<a  href="#" class="weui_btn_dialog primary" id="lookTestScore_yes" style="color:#18b4ed">确定</a>
				</div>
			</div>
		</div>
	</body>
	<script type="text/javascript" src="../../script/api.js"></script>
	<script src="../../script/jquery.min.js" type="text/javascript"></script>
	<script type="text/javascript" src="../../script/MD5.js"></script>
	<script src="../../script/common.js"></script>
	<script src="../../script/swiper-3.4.2.jquery.min.js" type="text/javascript"></script>
	<script type="text/javascript" src="../../script/requestTool.js"></script>
	<script type="text/javascript" src="../../script/timeStampTool.js"></script>
	<script type="text/javascript" src="../../script/PracticeExam.js"></script>
	<script type="text/javascript">
		/* 题目提交结果对象数组*/
		var daan = new Object();
		/* 题目长度*/
		var questionLen = '';
		/* 题目id数组*/
		var qidArr = new Array();
		/* 考核id*/
		var tid = "";
		/* 考核开始时间*/
		var stime = "";
		/* 当前时间*/
		var nowtime = "";
		/* 考核时长*/
		var timeNum = "";
		/* 考核通过成绩*/
		var passScore = "";
		/* 是否参加考试过*/
		var isanswer = "";
		/* 考试次数*/
		var examnum = "";
		/* 考试token*/
		var token = "";
		/* 最多考核次数*/
		var e_big_exam = "";
		/* 考核完是否显示成绩*/
		var e_display_cj = "";
		/* 考核完是否显示答案*/
		var e_display_da = "";
		/* 考试状态
		 * 0:正常情况
		 * 1:数据加载失败
		 * 2:点击提交按钮,提交空卷
		 * 3:点击返回键,提交空卷
		 * 4:考试时间到期，自动提交
		 * 5：考试时间未到,网络断网，提交失败
		 * 6:
		 *
		 * */
		var test_type = "";
		/* 是否遍历数据*/
		var isergodic = false;
		//考核名称
		var course_name;
		apiready = function() {
			//准备数据
			preData();
			//答题卡滑动初始化
			scrollUI();
			//获取数据
			kebackListen();
			// 按钮点击事件
			btnClickEvents();
			listenScroll();
			sendBuriedNotifi('0', '实习考核页', '222');
		}
		function sendBuriedNotifi(busionessid, pagetype, pagetypeid) {
			var userinfo = {
				uid : $api.getStorage('cfnetppuid'),
				jid : $api.getStorage('cfnetppjid'),
				uname : $api.getStorage('cfnetppusername'),
			}
			var data = {
				busionessid : busionessid,
				pagetype : pagetype,
				pagetypeid : pagetypeid,
				sourceurl : api.pageParam.sourceurl,
				sourcetitle : api.pageParam.sourcetitle,
				accesspageurl : window.location.pathname,
				accesspagetitle : document.title,
				userinfo : userinfo
			}
			SendBehaviorTrajectoriesNotifi_Study(data);
		}

		// 滚动监听
		function listenScroll() {
			var winHeight = $(window).height();
			$(window).resize(function() {
				var thisHeight = $(this).height();
				if (winHeight - thisHeight > 50) {
					//当软键盘弹出，在这里面操作
					$("#sub_div").css('display', 'none');
				} else {
					$("#sub_div").css('display', 'block');
					//当软键盘收起，在此处操作
				}
			});
		}

		function preData() {
			var h = api.winHeight * 0.3;
			$('#popover-card').css('height', h);
			showProgress();
			getExamStatus();
		}

		//按钮点击事件
		function btnClickEvents() {
			//第一次进入考试提示确定按钮
			$('#toast_yes').click(function() {
				$('#toastAlert').hide();
				//开启加载框
				showProgress();
				getCourseExamToken()
			});
			//第一次进入考试提示取消按钮
			$('#toast_no').click(function() {
				$('#toastAlert').hide();
				backClick();
			});
			//数据异常是否退出当前考试页面确定按钮
			$('#NoDatacloseTest_yes').click(function() {
				$('#closeAlert').hide();
				backClick();
			});
			//显示出成绩是否退出当前考试页面确定按钮
			$('#lookTestScore_yes').click(function() {
				$('#scoreAlert').hide();
				backClick();
			});
			//正常情况下是否退出当前考试按钮取消键
			$('#closeTest_no').click(function() {
				$('#offlineAlert').hide();
			});
			//正常情况下是否退出当前考试按钮确定键
			$('#closeTest_yes').click(function() {
				$('#offlineAlert').hide();
				if (test_type == 0) {//已经获取了数据
					DeleteAnswerNullData();
					SubmitData(1);
				} else if (clickNum == 1) {//数据获取失败时
					backClick();
				}
			});
		}

		//判断实习考核状态(判断是否第一次参加考试)
		function getExamStatus() {
			var param = {
				token : token,
				exam_id : api.pageParam.exam_id,
				user_id : $api.getStorage('cfnetppuid'),
				//				user_id : api.pageParam.uid,
			};
			cfnetppPOST(url_getExamStatus, param, false, function(data, status) {
				hideProgress();
				if (status == 'success') {
					if (data.code == 200) {
						var list = data.data;
						if (list == 1) {//已参加考试
							//开启加载框
							showProgress();
							getCourseExamToken()
						} else {//未参加考试
							$('#checkNum3').text('考试只有一次机会，一旦进入则无法退出，确定进入考试？');
							$('#toastAlert').show();
						}
					} else {
						loadTestExamData('');
					}
				} else {
					api.toast({
						msg : '网络异常',
						duration : 2000,
						location : 'bottom'
					});
				}
			});
		}

		//获取是否之前有提交的题目答案
		function getUserQuestionAnswer() {
			var param = {
				token : token,
				exam_id : api.pageParam.exam_id,
				user_id : $api.getStorage('cfnetppuid'),
				//				user_id : api.pageParam.uid,
			};
			cfnetppPOST(url_getUserQuestionAnswer, param, false, function(data, status) {
				if (status == 'success') {
					if (data.code == 200) {
						var list = data.data;
						if (!isObjectEmpty(list)) {
							loadTestExamData(list);
						} else {
							loadTestExamData('');
						}
					} else {
						loadTestExamData('');
					}
				} else {
					api.toast({
						msg : '网络异常',
						duration : 2000,
						location : 'bottom'
					});
				}
			});
		}

		//倒计时
		function daojishi() {
			var t = setInterval(function() {
				if (timeNum > 0) {
					timeNum--;
					var currentTime = sZhuanHms(timeNum);
					x = document.getElementById("kaoShiTime");
					//查找元素
					x.innerHTML = currentTime;
				} else {
					document.getElementById("kaoShiTime").innerHTML = "00:00";
					clearTimeout(t);
					api.toast({
						msg : '答题时间已到正在为您交卷'
					});
					DeleteAnswerNullData();
					SubmitData(2);
				}
			}, 1000);
		}

		//获取课程考核token
		function getCourseExamToken() {
			if (api.pageParam.exam_id == "") {
				hideProgress();
				back('当前课程考核数据为空');
				return false;
			}
			var param = {
				appkey : api.pageParam.appkey,
				match_type : 4,
				user_id : $api.getStorage('cfnetppuid'),
				exam_id : api.pageParam.exam_id,
				plan_id : api.pageParam.internship_id,
				sxfpid:api.pageParam.id,//实习分配id
			};
			cfnetppPOST(url_getCourseExamToken, param, false, function(data, status) {
				hideProgress();
				if (status == 'success') {
					if (data.code == 200) {
						var list = data.data;
						if (!isObjectEmpty(list)) {
							token = list.token;
							stime = list.timestamp;
							nowtime = list.nowtime;
							//暂时屏蔽
							getExamInfo();
							getUserQuestionAnswer();
						} else {
							back('当前考试数据为空');
						}
					} else if (data.code == 128) {
						back('当前章节数据为空');
					} else {
						back('获取考核数据失败');
					}
				} else {
					api.toast({
						msg : '网络异常',
						duration : 2000,
						location : 'bottom'
					});
				}
			});
		}

		//获取课程考试基本信息
		function getExamInfo() {
			var param = {
				exam_id : api.pageParam.exam_id,
			};
			cfnetppPOST(url_getCourseExamInfo, param, false, function(data, status) {
				if (status == 'success') {
					if (data.code == 200) {
						var list = data.data;
						if (!isObjectEmpty(list)) {
							$('#score').text(list.zscore);
							passScore = parseInt(list.efen);
							$('#passscore').text(passScore);
							$('#kstime').text(list.dtime);
							course_name = list.ename;
							$('#title').text(list.ename);
							/*考试时长*/
							var dtime = parseInt(list.dtime) * 60;
							/*现在时间*/
							var etime = (Date.parse(new Date())) / 1000;
							/*stime 进入考试时间*/
							/*考试消耗时间,如果时间过长则视为当前考试已结束*/
							var consume_time = (parseInt(nowtime - stime)) >= 0 ? parseInt(nowtime - stime) : dtime;
							var time_difference = parseInt(dtime - consume_time);
//							alert('考试开始时间'+timeWithStamp(stime));
//							alert('消耗时间'+consume_time);
							timeNum = time_difference > 0 ? time_difference : 0;
							e_big_exam = parseInt(list.e_big_exam);
							//考核完是否显示成绩
							e_display_cj = parseInt(list.e_display_cj);
							//是否显示答案
							e_display_da = parseInt(list.e_display_da);
						} else {
							back('当前考试基本信息为空');
						}
					} else if (data.code == 128 || data.code == 108) {
						back('当前考试基本信息为空');
					} else {
						back('数据异常');
					}
				} else {
					api.toast({
						msg : '网络异常',
						duration : 2000,
						location : 'bottom'
					});
				}
			});
		}

		//考试题目接口
		function loadTestExamData(scoreData) {
			showProgress();
			var param = {
				token : token,
				exam_id : api.pageParam.exam_id,
				user_id : $api.getStorage('cfnetppuid'),
			};
			cfnetppPOST(url_getCourseExamQuestions, param, false, function(data, status) {
				hideProgress();
				if (status == 'success') {
					if (data.code == 200) {
						var list = JSON.parse(data.data);
						if (!isObjectEmpty(list)) {
							test_type = 0;
							var TestData = GetTestData(list);
							questionLen = TestData.length;
							setUpObject(TestData);
							if (isObjectEmpty(scoreData)) {//不存在已经提交过的答题数据
								$(".swiper-wrapper").append(SetTestExamUI(TestData));
							} else {
								$(".swiper-wrapper").append(SetTestExamScoreUI(TestData, scoreData));
							}
							InitmySwiper();
							daojishi();
						} else {
							test_type = 0;
							back('考试题目为空');
						}
					} else if (data.code == 116) {
						back('考试次数达到上限');
						test_type = 0;
					} else if (data.code == 111) {
						back('已过期');
						test_type = 0;
					} else if (data.code == 110) {
						back('未开始');
						test_type = 0;
					} else if (data.code == 108) {
						back('考试题目为空');
						test_type = 0;
					} else {
						test_type = 0;
						back('考试题目数据异常');
					}
				} else {
					test_type = 0;
					api.toast({
						msg : '网络异常',
						duration : 2000,
						location : 'bottom'
					});
				}
			});
		}

		function PopupHint2(str) {
			$("#checkNum2").text(str);
			$('#closeAlert').show();
		}

		//检查题目是否提交
		function CheckSubmit() {
			DeleteAnswerNullData();
			var daanLen = ObjectCount(daan);
			var strLen = questionLen - daanLen;
			if (strLen > 0) {//题目未答数量大于0
				$("#checkNum").text("您还有" + strLen + "道题未提交,是否确定提交?");
			} else {
				$("#checkNum").text("是否确定提交？");
			}
			$('#offlineAlert').show();
			clickNum = 1;
		}

		//系统返回键监听
		function kebackListen() {
			api.addEventListener({
				name : 'keyback'
			}, function(ret, err) {
				backKey();
			});
		}

		//退出考试提示
		function backKey() {
			backClick();
		}

		function backClick() {
			sendNotifi();
			sendBuriedNotifi('1', '实习考核页', '222');
			api.closeWin({
			});
		}

		//提交答题数据
		function SubmitData(type) {
			var etime = (Date.parse(new Date())) / 1000;
			var param = {
				appkey : api.pageParam.appkey,
				exam_id : api.pageParam.exam_id,
				user_id : $api.getStorage('cfnetppuid'),
				//				user_id : api.pageParam.uid,
				token : token,
				match_type : 4,
				stime : stime,
				etime : etime,
				sub_type : type,
				jid : $api.getStorage('cfnetppjxid'),
				//暂时注释
				//				user_answer : daan,
				sxfpid:api.pageParam.id,//实习分配id
				plan_id : api.pageParam.internship_id,
				message : ''
			};

			cfnetppPOST(url_CourseExamSubmit, param, false, function(data, status) {
			   SendBusinessOperationsLogNotifi('实习考核提交', '222', param, param, '', data, '实习考核提交接口', '222-02')
				hideProgress();
				if (status == 'success') {
					if (data.code == 200) {
						$('#scoreAlert').show();
						sendNotifi();
						if (data.data.fenshu >= passScore) {
							$('#score_title').text('此次考试得分' + data.data.fenshu + '分');
							$('#score_content').text('恭喜你,通过考试');
						} else {
							$('#score_title').text('此次考试得分' + data.data.fenshu + '分');
							$('#score_content').text('很遗憾,未通过 ,继续加油吧');
						}
					} else if (data.code == 108) {
						ShowToast('请勿重复提交');
					} else {
						api.toast({
							msg : '提交失败',
							duration : 2000,
							location : 'bottom'
						});
					}
				} else {
					api.toast({
						msg : '提交失败',
						duration : 2000,
						location : 'bottom'
					});
				}
			});
		}

		//提交单道答题数据
		function SubmitSingleQuestion(questionid, content) {
			var param = {
				appkey : api.pageParam.appkey,
				exam_id : api.pageParam.exam_id,
				user_id : $api.getStorage('cfnetppuid'),
				//				user_id : api.pageParam.uid,
				token : token,
				question : questionid,
				content : content,
			};
			cfnetppPOST(url_doSubmitSingleQuestion, param, false, function(data, status) {
			SendBusinessOperationsLogNotifi('实习考核提交单道题目', '222', param, param, '', data, '实习考核提交单道题目接口', '222-01')
				hideProgress();
				if (status == 'success') {
					if (data.code == 200) {
					} else {
					}
				} else {
				}
			});
		}

		//删除数组中为空的数据
		function DeleteAnswerNullData() {
			isergodic = true;
			for (var k = 0; k < questionLen; k++) {
				GetAnswerData(k);
			}
			for (var k = 0; k < qidArr.length; k++) {
				if ( typeof daan[qidArr[k]] == 'string') {
					if (isEmpty(daan[qidArr[k]])) {
						delete daan[qidArr[k]];
						k = k - 1;
					}
				} else if ( typeof daan[qidArr[k]] == 'object') {
					if (isObjectEmpty(daan[qidArr[k]])) {
						delete daan[qidArr[k]];
						k = k - 1;
					}
				}
			}
		}

		//得到答案数据
		function GetAnswerData(slideNumber) {
			/*多选题选项id*/
			var duooptionid = "";
			/*单选题选项id*/
			var danoptionid = ""
			//题目id
			var Questionid = "";
			//单道题目选择结果
			var SingleQuestionScore = "";
			/*多选结果对象*/
			var duoObject = new Object();
			/*多选结果大写数组*/
			var duofromCharCodeArr = new Array();
			//论述题id
			var duoQuestionidArr = new Array();
			var lunshuContent = '';
			var itemtype = $(".swiper-wrapper").children().eq(slideNumber).attr('itemtype');
			//获取题目类型
			if (itemtype == '1' || itemtype == '2' || itemtype == '3' || itemtype == '5' || itemtype == '7' || itemtype == '8' || itemtype == '9') {//单选题,多选题,判断题
				$(".swiper-wrapper").children().eq(slideNumber).find('input').each(function(i) {
					if ($(this).attr('type') === 'radio') {
						if (this.checked == true) {
							danoptionid = i + 1;
							$("#scroll-card").find("span").eq(slideNumber).removeClass('qusetion-num-normal').addClass('qusetion-num-selected');
							Questionid = $(this).attr('itemid');
							SingleQuestionScore = fromCharCode(i + 1);
							daan[Questionid] = danoptionid;
						}
					} else if ($(this).attr('type') === 'checkbox') {
						if (this.checked == true) {
							duooptionid = i + 1;
							Questionid = $(this).attr('itemid');
							duoObject[duooptionid] = "1";
							duofromCharCodeArr.push(i + 1);
							$("#scroll-card").find("span").eq(slideNumber).removeClass('qusetion-num-normal').addClass('qusetion-num-selected');
						} else {
							duooptionid = i + 1;
							Questionid = $(this).attr('itemid');
							duoObject[duooptionid] = "";
							if (duofromCharCodeArr.indexOf(i + 1) == 0) {//如果出现已选的题目，则删除该index
								duofromCharCodeArr.remove(i + 1);
							}
							delete duoObject[duooptionid];
						}
						if (JSON.stringify(duoObject) == "{}" || duofromCharCodeArr.length == 0) {
							$("#scroll-card").find("span").eq(slideNumber).removeClass('qusetion-num-selected').addClass('qusetion-num-normal');
						}
						SingleQuestionScore = getCapitalArr(duofromCharCodeArr);
						daan[Questionid] = duoObject;
					}
				});
			} else {
				$(".swiper-wrapper").children().eq(slideNumber).find('textarea').on('input', function() {
					Questionid = $(this).attr('itemid');
					//				//论述题内容
					lunshuContent = $(this).val();
					if (!isEmpty(lunshuContent)) {
						$("#scroll-card").find("span").eq(slideNumber).removeClass('qusetion-num-normal').addClass('qusetion-num-selected');
					}
					SingleQuestionScore = lunshuContent;
					daan[Questionid] = lunshuContent;
				});
			}
			if (!isergodic) {
				SubmitSingleQuestion(Questionid, SingleQuestionScore);
			}
		}

		//得到大写字母数组
		function getCapitalArr(list) {
			var CapitalArr = new Array();
			if (!isArrayEmpty(list)) {
				var arr = list.sort();
				for (var i = 0; i < arr.length; i++) {
					CapitalArr.push(fromCharCode(arr[i]))
				}
				return CapitalArr.join("|")
			} else {
				return CapitalArr
			}
		}

		//设置空数组
		function setUpObject(data) {
			var questions = data;
			for (var i = 0; i < questions.length; i++) {
				var question = questions[i];
				qidArr.push(question.qid);
				//子问题数组
				if (question.qtype == '1' || question.qtype == '3' || question.qtype == '8') {//单选题
					//取出子题目
					daan[question.qid] = new String();
				} else if (question.qtype == '2' || question.qtype == '7' || question.qtype == '9') {//多选题识图题
					//取出子题目
					daan[question.qid] = new Array();
				} else if (question.qtype == '4' || question.qtype == '10') {//论述题
					//取出子题目
					daan[question.qid] = new Array();
				}
			}
		}

		//发送通知
		function sendNotifi() {
			api.sendEvent({
				name : 'RefreshPracticeExamList'
			});
		}
	</script>
</html>